#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
void reverse(char*arr, int left, int right)
{
	char tmp = 0;
	while (left < right)
	{
		
		tmp = *(arr + left);
		*(arr + left) = *(arr + right);
		*(arr + right) = tmp;
		right--;
		left++;
	}
}
void zuoxuan(char* arr, int i)
{
	int sz = strlen(arr);
	reverse(arr, sz  - i, sz - 1);
	reverse(arr, 0, sz - 1 - i);
	reverse(arr, 0, sz - 1);
}
int main()
{
	char arr[]="ABCD";
	int i = 2;
	zuoxuan(arr, i);
	printf(arr);
	return 0;

}